<?php foreach ($this->dirs as $dir):?>
<ul>
    <li>
        <a href="/media/<?php echo $dir;?>"><?php echo $dir;?></a>
    </li>
</ul>
    

<?php endforeach; ?>